<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <html>
        <head>
            <title></title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
            <css file='__PUBLIC__/Uploadify/uploadify.css'/>
            <script src="__PUBLIC__/uploadify/jquery.uploadify-3.1.min.js"></script>
        <link href="__PUBLIC__/admin/css/category.css" rel="stylesheet" type="text/css"/>  
        <script>
            $(function() {
                $("#upload").uploadify({
                    height        : 30,
                    swf           : '__PUBLIC__/Uploadify/uploadify.swf',
                    uploader      : '{:U("Common/upload")}',
                    formData : { 'session_id' : '<?php echo session_id();?>' },
                    width         : 120,
                    onUploadSuccess:function(file, data, response){
                        eval("var data = " + data);
         		if (data.status) {
         			var path = '__ROOT__/Uploads/breed/' + data.path;
         			$('.show img').attr('src', path).show();
         			$('input[name="logo"]').val(data.path);
         		}
                    }
                });
            });
        </script>
    </head>
    <body>
        <div class='content'>
                <div class='t'>
			<h3>添加品牌</h3>
		</div>
            <form action="{:U('add')}" method="post" enctype='multipart/form-data'>
                        <table>
                            <input type="hidden" name='logo'/>
                            <tr>
                                <th>品牌名称</th>
                                <td><input type="text" name='name'/>
                                    <span class="red">*</span><span class='catname'>品牌名称请使用中文、英文、下划线</span></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td class='show'><img width='120' height='50'  style="display: none;"/></td>
                            </tr>
                            <tr>
                                <th>上传品牌logo</th>
                               
                                <td><input type="file" name='breed_logo' id='upload'/></td>
                            </tr>
                            <tr>
                                <td colspan="2" width="45%" align='right'><input type="submit" class="bt1" value="添 加"/></td>
                            </tr>
                        </table>
                    <div>
                        
                    </div>

            </form>
        </div>
    </body>
</html>